package service;

import pojo.Customer;

import java.util.List;

public class CustomerImpl implements CustomerService {
    private mapper.Customer mapper;

    public void setCustomer(mapper.Customer customer) {
        this.mapper = customer;
    }

    @Override
    public int addCustomer(Customer customer) {
        return mapper.addCustomer(customer);
    }

    @Override
    public int delCustomer(int id) {
        return mapper.delCustomer(id);
    }

    @Override
    public int updateCustomer(Customer customer) {
        return mapper.updateCustomer(customer);
    }

    @Override
    public List<Customer> selectCustomer(int pageSize) {
        return mapper.selectCustomer(pageSize);
    }

    @Override
    public int sumCustomer() {
        return mapper.sumCustomer();
    }

    @Override
    public List<Customer> queryCustomer(String args) {
        return mapper.queryCustomer(args);
    }

    @Override
    public Customer oneCustomer(String iphone) {
        return mapper.oneCustomer(iphone);
    }
}
